{template 'total/header'}

<style>
    .hp-visited a:visited{color: #444;}
    .input-append button{font-size:12px;}
</style>
<div style="clear:both">
    <div style="float: left">
        <h5>
            <span class="add-on"><i class="icon-calendar"></i> 日连续留存数据 </span>
        </h5>
    </div>
    <div style="float: right">
        <form style="margin:0;padding:0;">
            <input name="bt" type="text" id="bt" placeholder="起始日" class="span1" value="{$bt}" style="margin-top:10px;font-size:12px;" /> -
            <input name="et" type="text" id="et" placeholder="截止日" class="span1" value="{$et}"  style="margin-top:10px;font-size:12px;" />
            &nbsp; <input type="submit" id="inputSubmit" class="btn" value="筛选">
        </form>
    </div>
</div>

<table class="table table-striped table-bordered table-hover">
    <thead>
        <tr>
            <th><center>日期</center></th>
            <th><center>新增用户</center></th>
            <th><center>日活用户</center></th>
            <th><center>次日留存</center></th>
            <th><center>连续2日留存</center></th>
            <th><center>连续3日留存</center></th>
            <th><center>连续4日留存</center></th>
            <th><center>连续5日留存</center></th>
            <th><center>连续6日留存</center></th>
            <th><center>连续7日留存</center></th>
        </tr>
    </thead>
    <tbody>
        {loop $totalDays $v}
        <tr>
            <td><center>{$v['ymd']}</center></td>
            <td><center>{$v['new']}<br /> <code style="color:#333">{$v['new_android']}</code> <code style="color:#333">{$v['new_ios']}</code></center></td>
            <td><center>{$v['active']}<br /> <code style="color:#333">{$v['active_android']}</code> <code style="color:#333">{$v['active_ios']}</code></center></td>
            {for $i = 1; $i <=7; $i++ }
            <td><center>{eval echo $v['stay'.$i]}<br /> {if $v['stay'.$i.'_rate'] != '0%'}<div style="margin-bottom:3px;"><code>{eval echo $v['stay'.$i.'_rate']}</code></div>{/if} <code style="color:#333">{eval echo $v['stay'.$i.'_android']}</code> <code style="color:#333">{eval echo $v['stay'.$i.'_ios']}</code></center></td>
            {/for}
        </tr>
        {/loop}
    </tbody>
</table>

{template 'total/footer'}